package cn.tj212.xiaoyin.core.course.service;

import cn.tj212.xiaoyin.common.page.TailPage;
import cn.tj212.xiaoyin.core.course.domain.CourseComment;
import cn.tj212.xiaoyin.core.course.domain.CourseSection;

import java.util.List;

public interface ICourseSectionService {

    public CourseSection getById(Long sectionId);

    public List<CourseSection> queryAll(CourseSection queryEntity);

    /**
     * 获取课程ID最大的sort
     * @param courseId
     * @return
     */
    public Integer getMaxSort(Long courseId);


    public TailPage<CourseSection> queryPage(CourseSection queryEntity,TailPage<CourseSection> page);

    public void createSelectivity(CourseSection entity);

    /**
     * 批量创建
     * @param entityList
     */
    public void createList(List<CourseSection> entityList);

    public void update(CourseSection entity);

    public void updateSelectivity(CourseSection entity);

    public void delete(CourseSection entity);

    public void deleteLogic(CourseSection entity);

    /**
     * 比当前sort大的，正序排序的第一个
     * @param curCourseSection
     * @return
     */
    public CourseSection getSortSectionMax(CourseSection curCourseSection);

    /**
     * 比当前sort小的，倒序排序的第一个
     * @param curCourseSection
     * @return
     */
    public CourseSection getSortSectionMin(CourseSection curCourseSection);

}
